const {encryptByDESModeCBCUtf8to64, decryptByDESModeCBC} = require("@/common/utils/des")
const os = require("os");
const secret = {}
secret.get = (shopId) => {
  let obj = {
    shopId: shopId,
    deviceNumber: os.hostname(),
  }
  if (process.env.ENV === 'development') {
    obj = {
      deviceNumber: 'W002',
      shopId: 8333,
    }
  }
  return encryptByDESModeCBCUtf8to64(JSON.stringify({
    ...obj,
    d: new Date().getTime()
  }))
}
module.exports = secret;
